package pOJ;

import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int n = scan.nextInt();
            String[] str = new String[n];
            for (int i = 0; i < n; i++) {
                str[i] = scan.next();
            }
            for (int i = 0; i < str.length - 1; i++) {
                for (int j = 0; j < str.length - i - 1; j++) {
                    if (str[j].compareTo(str[j+1]) > 0) {
                        String temp = str[j];
                        str[j] = str[j+1];
                        str[j+1] = temp;
                    }
                }
            }
            for (int i = 0; i < str.length - 1; i++) {
                System.out.print(str[i] + " ");
            }
            System.out.println(str[str.length - 1]);
        }
    }
}